$(function(){
/*禁用、启动动画效果*/
	$(".shebei2_jinyong").click(function(){
		//alert($(".shebei2_jinyong span").css("margin-left"));
		if($(".shebei2_jinyong span").css("margin-left")=="2.4px"){
			$(".shebei2_jinyong").css({"transition":"all 0.1s","background":"#14d212"});
			$(".shebei2_jinyong span").css({"transition":"all 0.1s","margin-left":"2.35rem"});
		}else{
			$(".shebei2_jinyong").css({"transition":"all 0.1s","background":"#999"});
			$(".shebei2_jinyong span").css({"transition":"all 0.1s","margin-left":"0.15rem"});
		}		
	});;;;;
/*远程补币*/
	var str=/^\d{1,2}$/;
	var shebei2_ycb=1;
	$(".shebei2_bubitext").blur(function(){
		var shebei2_bubitext=$(".shebei2_bubitext").val();
		if(str.test(shebei2_bubitext) && parseInt(shebei2_bubitext)>=1){
			shebei2_ycb=parseInt(shebei2_bubitext);  //数据存入全局变量里
		}else{
			alert("请输入1-99的数字");
		}
	});;;;;
	//点击减少
	$(".shebei2_bubijian").click(function(){
		shebei2_ycb--;
		if(shebei2_ycb<=1){
			shebei2_ycb=1;
		}
		$(".shebei2_bubitext").val(shebei2_ycb);
	});;;;;
	//点击增加
	$(".shebei2_bubijia").click(function(){
		shebei2_ycb++;
		if(shebei2_ycb>=99){
			shebei2_ycb=99;
		}
		$(".shebei2_bubitext").val(shebei2_ycb);
	});;;;;
	//点击确定将实时数据传回
	$(".shebei2_bubibtn").click(function(){
		shebei2_ycb=$(".shebei2_bubitext").val();
	});;;;;
	
/*弹窗  多局二维码放大    设备名称修改*/	
	$(".shebei2_tanchuang, .shebei2_erweima, .shebei2_shebeiname").hide();
	//多局二维码放大 
	$(".shebei2_djewm").click(function(){		
		$(".shebei2_tanchuang, .shebei2_erweima").stop().show();
	});;;;;
	//设备名称修改
	var shebei2_sbnameval="兑币机1001";
	$(".shebei2_bdp1").click(function(){		
		$(".shebei2_tanchuang, .shebei2_shebeiname").stop().show();
		//取消修改，未确定修改则span和input里的值始终为原值
		$(".shebei2_shebeiname input:eq(1)").click(function(){
			$(".shebei2_shebeiname input:eq(0)").val(shebei2_sbnameval);
			$(".shebei2_tanchuang, .shebei2_shebeiname").stop().hide();
		});;;;;
		//确定修改，才将span和input里的值变为shebei2_sbnameval
		$(".shebei2_shebeiname input:eq(2)").click(function(){
			shebei2_sbnameval=$(".shebei2_shebeiname input:eq(0)").val();
			$(".shebei2_bdp1 a span:eq(1)").text(shebei2_sbnameval);
			$(".shebei2_tanchuang, .shebei2_shebeiname").stop().hide();
		})
		
	})
	
	
	
	
	
	
	
	
	
	
	
});;;;;
